{include file="header.html"}
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    $('#output_btn').bind('click',function(){
        if($('#add_time_from').val() == '' || $('#add_time_to').val() == '')
        {
            alert("请选择申请时间!")
            return false;
        }
        var $hidden_input=$('<input type="hidden" id="out_hid_input" name="isexport" value="1" />');
        $("input[name='act']").val("export");
        $('#output_form').prepend($hidden_input).submit();
        $("input[name='act']").val("index");
        $('#out_hid_input').remove();
    });
});
</script>
<div id="rightTop">
    <p>{$lang.returns_manage}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
        <li><a  href="javascript:;" class="btn1" id="output_btn" >导出</a></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get" id="output_form">
             <div class="left">
                <input type="hidden" name="app" value="returns" />
                <input type="hidden" name="act" value="index" />
                <select class="querySelect" name="field">{html_options options=$search_options selected=$smarty.get.field}
                </select>:<input class="queryInput" type="text" name="search_name" value="{$query.search_name|escape}" />
                <select class="querySelect" name="status">
                    <option value="">{$lang.search_status}</option>
                    {html_options options=$returns_status_list selected=$query.status}
                </select>
                {$lang.add_time_from}:<input class="queryInput pick_date" type="text" value="{$query.add_time_from}" id="add_time_from" name="add_time_from" />
                {$lang.add_time_to}:<input class="queryInput pick_date" type="text" value="{$query.add_time_to}" id="add_time_to" name="add_time_to" />
                {$lang.returns_amount_from}:<input class="queryInput2" type="text" value="{$query.returns_amount_from}" name="returns_amount_from" />
                {$lang.returns_amount_to}:<input class="queryInput2 pick_date" type="text" style="width:60px;" value="{$query.returns_amount_to}" name="returns_amount_to" />
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=returns">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">
        {if $returnss}{include file=page.top.html}{/if}
    </div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $returns_list}-->
        <tr class="tatr1">
            <td width="12%" class="firstCell"><span ectype="order_by" fieldname="returns_sn">{$lang.returns_sn}</span></td>
            <td width="8%"><span ectype="order_by" fieldname="order_sn">{$lang.order_sn}</span></td>
            <td width="12%"><span ectype="order_by" fieldname="out_trade_sn">{$lang.out_trade_sn}</span></td>
            <td>{$lang.goods_info}</td>
            <td width="6%"><span ectype="order_by" fieldname="returns_amount">{$lang.returns_amount}</span></td>
            <td width="10%">{$lang.store_name}</td>
            <td width="10%"><span ectype="order_by" fieldname="add_time">{$lang.add_time}</span></td>
            <td width="10%"><span ectype="order_by" fieldname="status">{$lang.status}</span></td>
            <td width="10%">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$returns_list item=returns}-->
        <tr class="tatr2">
            <td class="firstCell">{$returns.returns_sn|escape}</td>
            <td>{$returns.order_sn}</td>
            <td>{$returns.out_trade_sn}</td>
            <td><a href="{$site_url}/index.php?app=goods&amp;id={$returns.goods_id}" title="{$returns.goods_name|escape}" target="_blank" class="linkbtn">{$returns.goods_name|escape}</a><br/>{$returns.specification|escape} {$lang.quantity}{$returns.quantity}</p></td>
            <td>{$returns.returns_amount|price}</td>
            <td>{$returns.seller_name|escape}</td>
            <td>{$returns.add_time}</td>
            <td>{$returns.returns_status|escape}</td>
            <td>
                <a href="index.php?app=returns&amp;act=view&amp;id={$returns.returns_id}">{$lang.view}</a>
                 | <a href="index.php?app=returns&amp;act=add_track&amp;id={$returns.returns_id}">退货跟进</a>
                <!--{if $returns.type eq 2 and $returns.status gt 6}--> | <!--{if $returns.shipping_status eq 0}--><a href="index.php?app=returns&amp;act=add_shipping_fee&amp;id={$returns.returns_id}">添加退货运费</a><!--{else}--><a href="index.php?app=returns&amp;act=view_shipping_fee&amp;id={$returns.returns_id}">查看退货运费</a><!--{/if}--><!--{/if}--></td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="7">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <div id="dataFuncs">
        <div class="pageLinks">
            {if $returns}{include file=page.bottom.html}{/if}
        </div>
    </div>
    <div class="clear"></div>
</div>
{include file="footer.html"}
